package readytest;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by leeping on 2016/3/21.
 */
public class SocktB {
	public static void main(String[] args) throws Exception {
		ServerSocket socket = new ServerSocket(1101);
		while (true) {
			Socket socket1 = socket.accept();
			DataInputStream outputStream = new DataInputStream(socket1.getInputStream());
			String a = outputStream.readUTF();
			System.out.println(a);
		}

	}
}
